package controllers

import (
	"Pj/utils"
	"github.com/astaxie/beego"
)

type MainController struct {
	beego.Controller
}

func (c *MainController) Get() {
	// Data
	var tpl utils.Tpl
	tpl.Title = "BeegoCURD"
	tpl.Success = c.GetSession("success")
	tpl.Danger = c.GetSession("danger")
	c.DelSession("success")
	c.DelSession("danger")
	c.Data["Tpl"] = tpl
	c.Data["Website"] = "beego.me"
	c.Data["Email"] = "astaxie@gmail.com"
	c.Layout = "public/tpl.html"
	c.TplName = "index.tpl"
}
